package com.ruoyi.repast.service.impl;

import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.repast.entity.BReserve;
import com.ruoyi.repast.entity.BReserveServe;
import com.ruoyi.repast.service.BReserveServeService;
import org.nutz.dao.Cnd;
import org.nutz.plugin.spring.boot.service.BaseService;
import org.nutz.plugin.spring.boot.service.entity.Pager;
import org.springframework.stereotype.Service;

/**
 * @author zhangjialu
 * @date 2021/8/1 下午2:46
 */
@Service
public class BReserveServeServiceImpl extends BaseService<BReserveServe> implements BReserveServeService {
    @Override
    public TableDataInfo listPage(BReserveServe bReserveServe, Integer pageNum, Integer pageSize) {
        Pager<BReserveServe> pager= this.searchByPage(pageNum,pageSize, Cnd.NEW().and("delFlag","=","0"));

        TableDataInfo rspData = new TableDataInfo();
        rspData.setCode(0);
        rspData.setRows(pager.getDataList());
        rspData.setTotal(pager.getPageSize());

        return rspData;
    }
}
